{/* LAYOUT */}
<layout name="layout"/>
{/* LAYOUT */}
{/* import Js,Css */}	
<css href="__THEMES__/css/common.css" />
<css href="__PUBLIC__/css/jquery-ui.css" />
<js href="__PUBLIC__/js/core/jquery-ui.1.10.4.js" />
<js href="__PUBLIC__/js/core/plugins.js" />
<js href="__PUBLIC__/js/region.js" />
<js href="__PLUGS__/layer-v1.8.5/layer/layer.min.js" />
{/* import js,css */}
<style>
/*购物车样式*/
.store_cart {
	width: 960px;
	padding: 0 20px;
	margin: 0 auto;
	overflow: hidden;
}
.cart_progress_bar {
	width: 584px;
	margin: 59px auto;
	height: 34px;
	overflow: hidden;
	background: url(__THEMES__/images/store_bg.png) no-repeat 0 -38px;
}
.cart_progress_bar li {
	width: 190px;
	height: 33px;
	line-height: 33px;
	float: left;
	display: inline-block;
	font-size: 14px;
	color: #999999;
	padding-left: 30px;
}
.cart_progress_bar li.current {
	color: #FFFFFF;
}
.fillOrder .con .address{width: 100%;overflow: hidden;padding-bottom: 20px;}.fillOrder .con .address .hd{width: 100%;float: left;padding-top: 20px;font-size: 14px;color: #808184;line-height: 22px;font-weight: bold;}.hd h2{background: #fafafa;font-size: 16px;padding: 10px;padding-left: 15px;color: #000;font-weight:600;}.fillOrder .con .address .subHd{width: 100%;margin-top: 30px;padding-left: 40px;display: inline;float: left;font-size: 12px;color: #808184;line-height: 22px;}.iradio_flat-blue{background-position: -202px 0;}.fillOrder .con .address .subHd input[type='radio']{float: left;margin: 4px 5px 0 0;display: inline;}.icheckbox_flat-blue, .iradio_flat-blue{display: inline-block;padding: 0;width: 28px;height: 28px;background: url(__THEMES__/images/red.png) no-repeat;border: none;cursor: pointer;float: left;margin-right: 10px;}.fillOrder .con .address .subHd input[type='radio']{float: left;margin: 4px 5px 0 0;display: inline;}.iradio_flat-blue{background-position: -202px 0;}.iradio_flat-blue.checked{background-position: -174px 0;}/*new address*/.fillOrder .con .newAddress{margin-top: 20px;padding-left: 60px;clear: both;}.fillOrder .con .newAddress ul{width: 100%;float: left;}#shippingAddress li{padding: 0 0 10px;}.fillOrder .con .newAddress ul li{margin-top: 12px;width: 100%;float: left;line-height: 38px;}.fillOrder .con .newAddress label{width: 100px;float: left;font-size: 14px;}.fillOrder .con .newAddress .inputBg{float: left;}.fillOrder .con .newAddress input{border-radius: 4px;width: 500px;height: 30px;padding: 0px 13px;border: 1px solid #e0e4e7;outline: none;background: none;line-height: 30px;}#newAddress .validation-advice{width: auto;color: #e8380d;}.inputBg{border:none;}.fillOrder .con .newAddress .save{width: 106px;height: 35px;border: none;text-align: center;color: #fff;font-size: 14px;float: left;margin-left: 270px;margin-top: 15px;cursor: pointer;background: #e8380d;line-height: 28px;border-radius: 24px;font-size: 12px;}
.checkout .mod{padding: 10px 0 0;padding-bottom: 10px;border: none;width: 100%;}.checkout .mod .hd{width: 100%;float: left;font-size: 14px;color: #808184;line-height: 22px;clear: both;font-weight: bold;}
.checkout .mod .container{padding: 25px 45px;}#payment .payment-item{margin-left:40px;}#payment .payment-item li{float: left;margin: 0 20px 0 0;color: #000;height: 45px;width: 250px;}.address_item.checked{background-position: -174px 0;}.iradio_flat-blue{background-position: -202px 0;}#payment .payment-item li input, #payment .payment-item li span{float: left;margin-top: 2px;}#payment .payment-item li input, #payment .payment-item li span{float: left;margin-top: 2px;}#payment .payment-item li.alipay span.icon{width: 60px;height: 22px;}
#cart table{border-top:none;width:100%;}
#cart table th{text-align: center;border: #e7e7e7 1px solid;background: #fafafa;height: 36px;line-height: 36px;text-align: center;}
#cart table td{padding: 10px 0;border: #e0e0e0 1px solid;text-align: center;vertical-align: middle;}
#amount .costs{float: right;line-height: 40px;}#amount .costs label{color: #000;}#amount .costs label, #amount .costs span{line-height: 40px;height: 40px;position: static;}#amount .costs span{color: #ea4725;}#amount .costs label, #amount .costs span{line-height: 40px;height: 40px;position: static;}.button, .checkout .submitorderform{margin: 10px auto;text-align: right;width: 1150px;}.submitorderform .submit{width: 96px;height: 30px;border: none;text-align: center;color: #fff;font-size: 14px;cursor: pointer;background: #e8380d;line-height: 30px;border-radius: 4px;}
.checkout .mod .hd h2{background: #fafafa;font-size: 18px;padding: 10px;padding-left: 15px;color: #585858;margin-bottom: 20px;}.checkout .mod .container{padding: 25px 45px;}
.container{margin: 0 auto;overflow: hidden;}table{border-collapse: collapse;border-spacing: 0;max-width: 100%;background-color: transparent;}.hide, .hidden{display: none;}#repceipt td{padding: 5px;}#repceipt label{position: static;}.iradio_flat-blue.checked{background-position: -174px 0;}
</style>

<div class="maindom w_1200 mauto">
	<div class="store_cart">
		<ul class="cart_progress_bar">
			<li class="current">
				1&nbsp;&nbsp;我的购物车
			</li>
			<li class="current">
				2&nbsp;&nbsp;填写核对订单信息
			</li>
			<li>
				3&nbsp;&nbsp;成功提交订单
			</li>
			<div class="store_clear"></div>
		</ul>
	</div>
	<form id="theForm" name="flow" method="POST" action="__URL__/commitorder">
		<div class="fillOrder">
			<div class="con mauto">
				<div class="address" id="shippingAddress">
					<div class="hd">
						<h2>
							我的收获地址
						</h2>
					</div>
					<div class="subHd">
						<div class="address_item iradio_flat-blue" data="other_address" style="position: relative;">
							<input id="otherAddress" type="radio" class="other-address" onclick="selectAddress(this.value, -1, '鎵€鏈夊湴鍖?, 1)" value="-1" name="shippingAddress" regionname="鎵€鏈夊湴鍖? regionid="all" style="position: absolute; opacity: 0;">
							<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">
							</ins>
						</div>
						新增收获地址
					</div>
					<div id="newAddress" class="newAddress" style="display:none;">
						<ul>
							<li>
								<label>
									收货人姓名
								</label>
								<div class="inputBg">
									<input type="text" name="consignee" id="consignee" value="" class="required" disabled="">
								</div>
							</li>
							<li>
								<label>
									收货地址
								</label>
								<div class="city">
									<!--省-->								
									<select class="select fl"  name="province" id="selProvinces_{$consignee['key']}" onchange="region.changed(this, 2, 'selCities_{$consignee['key']}')">
										<option value="0">{$lang.please_select}{$name_of_region[1]}</option>
										<volist name="province_list" id="province">
											<option value="{$province.region_id}">
												{$province.region_name}
											</option>
										</volist>
									</select>											
									<!--市-->
									<select class="select fl ml10"  name="city" id="selCities_{$consignee['key']}" onchange="region.changed(this, 3, 'selDistricts_{$consignee['key']}')">
										<option value="0">{$lang.please_select}{$name_of_region[2]}</option>
										<volist name="city_list[ $consignee['key'] ]" id="city">
											<option value="{$city.region_id}"  <if condition="$consignee['city'] eq $city['region_id']">selected</if> >
												{$city.region_name}
											</option>
										</volist>
									</select>		
									<!--区-->		
									<select class="select fl ml10"  name="district" id="selDistricts_{$consignee['key']}" {if !$district_list.$k}style="display:none"{/if}>
										<option value="0">{$lang.please_select}{$name_of_region[3]}</option>
										<volist name="district_list[ $consignee['key'] ]" id="district">
											<option value="{$district.region_id}" <if condition="$consignee['district'] eq $district['region_id']">selected</if> >
												{$district.region_name}
											</option>
										</volist>
									</select>		
									<span class="codTips" id="newAddressCodTip" style="display:none;"></span>
								</div>
							</li>
							<li>
								<label>
									详细地址
								</label>
								<span id="selectedRegionNames" class="fl">
								</span>
								<div class="inputBg">
									<input type="text" class="required" name="address" id="address" value="" size="40" disabled="">
									<div class="field-hints" offsetelement="selectedRegionNames">
									</div>
								</div>
							</li>
							<li>
								<label>
									邮编
								</label>
								<div class="inputBg">
									<input type="text" maxlength="6" class="required validate-zipcode" value="" name="zipcode" id="zipcode" disabled="">
								</div>
							</li>
							<li>
								<label>
									手机号码
								</label>
								<div class="inputBg">
									<input type="text" class="validate-atleastone validate-phone element:'mobile'" value="" name="tel" id="tel" disabled="">
								</div>
								<div class="tips">
									
								</div>
							</li>
							<li>
								<label>
									家庭电话
								</label>
								<div class="inputBg">
									<input type="text" class="validate-mobile" name="mobile" value="" id="mobile" disabled="">
								</div>
							</li>
							<li>
								<label>
									最佳配送时间
								</label>
								<div class="delStyle">
									<div class="disFixBg">
										<select class="select fl" name="best_time" disabled="">
											<option value="WorkingDay">
												工作日
											</option>
											<option value="WorkingRestDay">
												工作或休息日
											</option>
											<option value="RestDay">
												休息日
											</option>
										</select>
									</div>
								</div>
							</li>
						</ul>
						<div class="btn clearfix">
							<input class="save" type="button" value="添加" id="saveAddress">
						</div>
						
					</div>
					<div class="allAddress">
						<include file="Flow:m_address_list"/>
					</div>
				</div>
			</div>
		</div>	
		
		<div class="clearfix mauto">
			<div id="payment" class="mod hide">
				<div class="hd">
					<h2>
						发票信息
					</h2>
				</div>
				<div class="container payment-item">
					<ul class="first clearfix" style="padding-top:20px;">
						<volist name="payment_list" id="payment">
							<if condition="$payment['pay_code'] eq 'cod'">
								<li class="item-content" id="li_alipay">
									<div class="iradio_flat-blue checked" style="position: relative;">
										<input type="radio" id="payment_cod" name="payment" bankpayment="" discountvalue="" value="{$payment.pay_id}" checked="true" onclick="selectPayment(this)" class="validate-reqchk-bynode nodeId:'payment'" style="position: absolute; opacity: 0;">
										<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>
									</div>
									<label for="payment_alipay" class="">
										<span>
											{$payment.pay_name}&nbsp;&nbsp;(<b style="color:red">閮ㄥ垎鍦板尯涓嶆敮鎸侀厤閫?/b>)
										</span>
										<span class="icon">
										</span>
									</label>
								</li>
							<elseif condition="$payment['pay_code'] eq 'alipay'"/>
								<li class="payment-item" id="li_alipay">
									<div class="iradio_flat-blue" style="position: relative;">
										<input type="radio" id="payment_alipay" name="payment" bankpayment="" discountvalue="" value="{$payment.pay_id}" checked="true" onclick="selectPayment(this)" class="validate-reqchk-bynode nodeId:'payment'" style="position: absolute; opacity: 0;">
										<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);"></ins>
									</div>
									<label for="payment_alipay" class="">
										<span>
											{$payment.pay_name}&nbsp;&nbsp;
										</span>
										<span class="icon">
										</span>
									</label>
								</li>
							</if>
						</volist>							
					</ul>
				</div>   
			</div>
		</div>
		
		<div class="clearfix mauto">
			<div id="repceipt" class="mod">
				<div class="hd">
					<h2>
						发票信息
					</h2>
				</div>
				<div class="container clearfix">
					<div style="margin-left:35px;">
						<table>
							<tbody>
								<tr>
									<td style="line-height: 28px;">
										<div class="clearfix">
											<label style="line-height:28px;">
												<div class="iradio_flat-blue checked" style="position: relative;">
													<input type="radio" name="inv_type" value="normal" checked="" style="position: absolute; opacity: 0;">
													<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">
													</ins>
												</div>
												普通发票
											</label>
										</div>
									</td>
									<td>
									</td>
								</tr>
								<tr class="receipthead hide">
									<td>
										<label style="display: inline-block;line-height:28px;float:left;" class="">
											<div class="iradio_flat-blue " style="position: relative;">
												<input type="radio" name="inv_type" value="self" id="per" checked=""style="position: absolute; opacity: 0;">
												<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">
												</ins>
											</div>
											个人发票
										</label>
										<label style="display: inline-block;line-height:28px;float:left;margin-left: 20px;">
											<div class="iradio_flat-blue" style="position: relative;">
												<input type="radio" name="receiptTitleType" value="company" id="com" style="position: absolute; opacity: 0;">
												<ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; border: 0px; opacity: 0; background: rgb(255, 255, 255);">
												</ins>
											</div>
											公司发票
										</label>
										<span class="hints" style="color:silver;line-height:25px">
											
										</span>
									</td>
								</tr>
								<tr class="hide">
									<td colspan="2" align="left" style="color:red;">
										
									</td>
								</tr>
								<tr id="receiptCompanyRow" class="hide">
									<td>
										
									</td>
									<td>
										<input type="text" class="txt" id="receiptTitle" name="receiptTitle" maxlength="25"
										size="50">
									</td>
								</tr>
								<tr class="hidden">
									<td>
										
									</td>
									<td>										
										<input type="hidden" name="receiptContent" value="">
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<div class="clearfix mauto">
			<div id="cart" class="mod">
				<div class="hd">
					<h2>
						商品信息
					</h2>
				</div>
				<div style="clear:both">
				</div>
				<div class="step2_Box mp20" id="step2_Box">
					<table class="shoppingCart" width="100%" height="50" border="0">
						<tbody>
							<tr>
								<th bgcolor="#ffffff">{$lang.goods_name}</th>
								<th bgcolor="#ffffff">
									<if condition="$gb_deposit">{$lang.deposit}<else/>{$lang.shop_prices}</if>
								</th>
								<th bgcolor="#ffffff">{$lang.number}</th>
								<th bgcolor="#ffffff">{$lang.subtotal}</th>
							</tr>
							<volist name="goods_list" id="goods">
								<tr>
									<td bgcolor="#ffffff">
									<if condition="$goods['goods_id'] gt 0 and $goods['extension_code'] eq 'package_buy'">
										<a href="javascript:void(0)" onclick="setSuitShow({$goods.goods_id})" class="f6">{$goods.goods_name}<span style="color:#FF0000;">锛坽$lang.remark_package}锛?/span></a>
										<div id="suit_{$goods.goods_id}" style="display:none">
											<volist name="$goods['package_goods_list']" id="package_goods_list">
												<a href="goods.php?id={$package_goods_list.goods_id}" target="_blank" class="f6">{$package_goods_list.goods_name}</a><br />
											</volist>
										</div>
									<else/>
										<a href="goods.php?id={$goods.goods_id}" target="_blank" class="f6">{$goods.goods_name}</a>
										<if condition="$goods['parent_id'] gt 0">
											<span style="color:#FF0000">{$lang.accessories}</span>
										<elseif condition="$goods['is_gift']"/>
											<span style="color:#FF0000">{$lang.largess}</span>
										</if>
									</if>
									<if condition="$goods['is_shipping']">
										(<span style="color:#FF0000">{$lang.free_goods}</span>)
									</if>
									</td>
									<td bgcolor="#ffffff" align="right">{$goods.formated_goods_price}</td>
									<td bgcolor="#ffffff" align="right">{$goods.goods_number}</td>
									<td bgcolor="#ffffff" align="right">{$goods.formated_subtotal}</td>
								</tr>				
							</volist>
						</tbody>
					</table>
				</div>
				<div id="amount">
					<div class="inner">
						<div class="clearfix">
							<div class="costs">
								<p class="product-amount">
									<label>
										{$lang.goods_all_price}: 
									</label>
									<span id="productAmount">
										{$total.goods_price_formated}
									</span>
								</p>					
								<if condition="$total['discount'] gt 0">
									<p>
										<em>
											-
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.discount}:
											</label>
											<span id="couponAmount">
												 <font class="f4_b">{$total.discount_formated}</font>
											</span>
										</span>
									</p>						
								</if>
								<if condition="$total['tax'] gt 0">
									<p>		
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.tax}:
											</label>
											<span id="couponAmount">
												<font class="f4_b">{$total.tax_formated}</font>
											</span>
										</span>					
									</p>						
								</if>		
								<if condition="$total['shipping_fee'] gt 0">
									<p>
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.shipping_fee}:
											</label>
											<span id="couponAmount">
												<font class="f4_b">{$total.shipping_fee_formated}</font>
											</span>
										</span>													
									</p>
								</if>	
								<if condition="$total['shipping_insure'] gt 0">
									<p>								
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.insure_fee}:
											</label>
											<span id="couponAmount">
												<font class="f4_b">{$total.shipping_insure_formated}</font>
											</span>
										</span>	
									</p>
								</if>				
								<if condition="$total['pay_fee'] gt 0">
									<p>							
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.pay_fee}:
											</label>
											<span id="couponAmount">
												<font class="f4_b">{$total.pay_fee_formated}</font>
											</span>
										</span>								 												
									</p>
								</if>	
								<if condition="$total['pack_fee'] gt 0">
									<p>
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.pack_fee}:
											</label>
											<span id="couponAmount">
												<font class="f4_b">{$total.pack_fee_formated}</font>
											</span>
										</span>									
																
									</p>
								</if>	
								<if condition="$total['card_fee'] gt 0">
									<p>
										<em>
											+
										</em>
										<span class="coupon-amout minus">
											<label>
												{$lang.card_fee}:
											</label>
											<span id="couponAmount">
												{$total.card_fee_formated}
											</span>
										</span>						
									</p>
								</if>						
								<p>
									<span class="order-amount" >
										<label>
											{$lang.total_fee}: 
										</label>
										<span id="payAmount">
											{$total.amount_formated}
										</span>
									</span>
								</p>
							</div>
						</div>
					</div>
				</div>
				<div class="submitorderform clearfix" style="margin-bottom:50px;">
					<input type="hidden" name="num" value="1">
					<input type="hidden" name="formHash" value="062fd79481bcdf64ba2fdcbe2caa4ec8">
					<input id="submitOrder" class="submit fr" type="submit" name="submitOrder" value="提交订单">
				</div>
			</div>
		</div>
	</form>
</div>


<script>
$(document).ready(function(){
//========================================
	/*选择地址*/
	$(".address_item").on("click",function (){
		$('.address_item').each(function(){
			$(this).removeClass('checked');
		});
		$(this).addClass('checked');
		if( 'other_address' == $(this).attr('data') ){
			//$('#newAddress').slideDown('slow');
			$('#newAddress').css('display','block');
			$('#newAddress').find("input[type='text']").each(function(){
				$(this).attr('disabled',false);
			});	
			$('#newAddress').find("select").each(function(){
				$(this).attr('disabled',false);
			});
		}
		else{
			//$('#newAddress').slideUp('slow');
			$('#newAddress').css('display','none');
			$('#newAddress').find("input[type='text']").each(function(){
				$(this).attr('disabled',true);
			});	
			$('#newAddress').find("select").each(function(){
				$(this).attr('disabled',true);
			});
		}
	});	
	
	/*保存地址*/
	$('#saveAddress').click(function(){
		var datas			=	$('#newAddress').QVal();
		datas['country']	=	1;
		var options = 	{
			url:'__URL__/add_consignee_ok',
			type:'post',
			dataType:'json',
			data:datas,
			beforeSend:function(){},
			success:function(result){
				$('.allAddress').html('').html(result);
			}
		}
		$.ajax(options);
	});
	
	/*付款*/
	$('.payment-item').find('.iradio_flat-blue').each(function(){
		$(this).click(function(){
			$('.payment-item').find('.iradio_flat-blue').each(function(){
				$(this).removeClass('checked');
				$(this).find('input[name=payment]').removeAttr('checked');
			});
			$(this).addClass('checked');
			$(this).find('input[name=payment]').attr('checked','checked');
		});
	});
	

//========================================
});
	
</script>







<include file="Library:service"/>
<include file="Library:footer"/>

